<template>
  <component :is="this.currentComponentName" :teacherBaseInfo="this.teacherBaseInfo"></component>
</template>

<script>
import Vue from 'vue'
import { CURRENT_DATE, TEACHER_BASE_INFO, USER_INFO } from '@/store/mutation-types'
import TeacherBaseInfoV1 from '@views/dashboard/gfxy/assessmentResult/commons/TeacherBaseInfoV1.vue'

export default {
  name: 'TeacherBaseInfo',
  props: {
    userName: {
      type: String,
      required: true
    },
    queryDate: {
      type: String,
      required: true
    },
    projectType:{
      type: String,
      required: true
    }
  },
  components:{TeacherBaseInfoV1},
  data(){
    return {
      currentComponentName:'teacher-base-info-v1',
      currentDate:'',
      teacherBaseInfo:{}
    }
  },
  created() {
    this.currentDate = Vue.ls.get(CURRENT_DATE);
  },
  mounted(){
    if(this.currentDate == this.queryDate){
      // 从缓存中获取teacherBaseInfo
      this.teacherBaseInfo = Vue.ls.get(TEACHER_BASE_INFO);

    } else {

    }
  }
}
</script>

<style scoped>

</style>